<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>lwIP: src/include/lwip/api.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">lwIP
   &#160;<span id="projectnumber">2.1.2</span>
   </div>
   <div id="projectbrief">Lightweight IP stack</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('api_8h.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">api.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="opt_8h.html">lwip/opt.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="arch_8h.html">lwip/arch.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="netbuf_8h.html">lwip/netbuf.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="sys_8h.html">lwip/sys.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="ip__addr_8h.html">lwip/ip_addr.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="err_8h.html">lwip/err.h</a>&quot;</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnetconn.html">netconn</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnetvector.html">netvector</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:af77be7590d3712259e78103c1dddf63f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="api_8h.html#af77be7590d3712259e78103c1dddf63f">NETCONN_FLAG_MBOXCLOSED</a>&#160;&#160;&#160;0x01</td></tr>
<tr class="separator:af77be7590d3712259e78103c1dddf63f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abee57aa0ba63e35742d411bc5224900a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="api_8h.html#abee57aa0ba63e35742d411bc5224900a">NETCONN_FLAG_NON_BLOCKING</a>&#160;&#160;&#160;0x02</td></tr>
<tr class="separator:abee57aa0ba63e35742d411bc5224900a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a70bb861ee643b60ee402fd48f581f58d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="api_8h.html#a70bb861ee643b60ee402fd48f581f58d">NETCONN_FLAG_IN_NONBLOCKING_CONNECT</a>&#160;&#160;&#160;0x04</td></tr>
<tr class="separator:a70bb861ee643b60ee402fd48f581f58d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d791955a4256a0589a3844e4e6f0f9c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="api_8h.html#a9d791955a4256a0589a3844e4e6f0f9c">NETCONN_FLAG_CHECK_WRITESPACE</a>&#160;&#160;&#160;0x10</td></tr>
<tr class="separator:a9d791955a4256a0589a3844e4e6f0f9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a60892e4eb139f10157847fea4266bf5b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="api_8h.html#a60892e4eb139f10157847fea4266bf5b">NETCONN_FLAG_IPV6_V6ONLY</a>&#160;&#160;&#160;0x20</td></tr>
<tr class="separator:a60892e4eb139f10157847fea4266bf5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a24d62a2a03ba421fcf2bdce1ea89b949"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="api_8h.html#a24d62a2a03ba421fcf2bdce1ea89b949">NETCONN_FIN_RX_PENDING</a>&#160;&#160;&#160;0x80</td></tr>
<tr class="separator:a24d62a2a03ba421fcf2bdce1ea89b949"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ce590f58be8f60dbde361920863b26d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="api_8h.html#a3ce590f58be8f60dbde361920863b26d">API_EVENT</a>(c,  e,  l)</td></tr>
<tr class="separator:a3ce590f58be8f60dbde361920863b26d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab2bd1d5e633e14e428cfc0ca908d5e0c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#gab2bd1d5e633e14e428cfc0ca908d5e0c">netconn_new</a>(t)&#160;&#160;&#160;<a class="el" href="api_8h.html#ad0a0434e5ff08bb350740cb840e2aca8">netconn_new_with_proto_and_callback</a>(t, 0, NULL)</td></tr>
<tr class="separator:gab2bd1d5e633e14e428cfc0ca908d5e0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62cd17ad03bb2817cb0c419e1c9790b1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="api_8h.html#a62cd17ad03bb2817cb0c419e1c9790b1">netconn_type</a>(conn)&#160;&#160;&#160;(conn-&gt;type)</td></tr>
<tr class="separator:a62cd17ad03bb2817cb0c419e1c9790b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1065e769f2276270722a7700182077bc"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#ga1065e769f2276270722a7700182077bc">netconn_peer</a>(c,  i,  p)&#160;&#160;&#160;<a class="el" href="api_8h.html#a28430d1d86733f1bf98dc31305c42104">netconn_getaddr</a>(c,i,p,0)</td></tr>
<tr class="separator:ga1065e769f2276270722a7700182077bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga37ec33522cfc26fa57251c33e4cebb3e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#ga37ec33522cfc26fa57251c33e4cebb3e">netconn_addr</a>(c,  i,  p)&#160;&#160;&#160;<a class="el" href="api_8h.html#a28430d1d86733f1bf98dc31305c42104">netconn_getaddr</a>(c,i,p,1)</td></tr>
<tr class="separator:ga37ec33522cfc26fa57251c33e4cebb3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga43e3f4c2169dec0f666c502e490416b7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__tcp.html#ga43e3f4c2169dec0f666c502e490416b7">netconn_listen</a>(conn)&#160;&#160;&#160;<a class="el" href="group__netconn__tcp.html#ga84333ba8e7cdf45558d2b4795f53265d">netconn_listen_with_backlog</a>(conn, <a class="el" href="group__lwip__opts__tcp.html#ga93cce3f47e33df11248c908d1775bacf">TCP_DEFAULT_LISTEN_BACKLOG</a>)</td></tr>
<tr class="separator:ga43e3f4c2169dec0f666c502e490416b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafea5e9b90770a7c6cd0762ceb65e5b46"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__tcp.html#gafea5e9b90770a7c6cd0762ceb65e5b46">netconn_write</a>(conn,  dataptr,  size,  apiflags)&#160;&#160;&#160;<a class="el" href="group__netconn__tcp.html#gacf9ce6f71652739d6be2ca83f7c423bf">netconn_write_partly</a>(conn, dataptr, size, apiflags, NULL)</td></tr>
<tr class="separator:gafea5e9b90770a7c6cd0762ceb65e5b46"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6a578dd5b55e4457e0d23574ec9c55bb"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="api_8h.html#a6a578dd5b55e4457e0d23574ec9c55bb">netconn_set_nonblocking</a>(conn,  val)</td></tr>
<tr class="separator:a6a578dd5b55e4457e0d23574ec9c55bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5789f0030b895b40625a74deb5a1092f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="api_8h.html#a5789f0030b895b40625a74deb5a1092f">netconn_is_nonblocking</a>(conn)&#160;&#160;&#160;(((conn)-&gt;flags &amp; <a class="el" href="api_8h.html#abee57aa0ba63e35742d411bc5224900a">NETCONN_FLAG_NON_BLOCKING</a>) != 0)</td></tr>
<tr class="separator:a5789f0030b895b40625a74deb5a1092f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae56911e2d92bebf43d73e116530e41f1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#gae56911e2d92bebf43d73e116530e41f1">netconn_set_ipv6only</a>(conn,  val)</td></tr>
<tr class="separator:gae56911e2d92bebf43d73e116530e41f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf001c7d5fbf97c04eb1d9ac7d14c9c31"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#gaf001c7d5fbf97c04eb1d9ac7d14c9c31">netconn_get_ipv6only</a>(conn)&#160;&#160;&#160;(((conn)-&gt;flags &amp; <a class="el" href="api_8h.html#a60892e4eb139f10157847fea4266bf5b">NETCONN_FLAG_IPV6_V6ONLY</a>) != 0)</td></tr>
<tr class="separator:gaf001c7d5fbf97c04eb1d9ac7d14c9c31"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ce3ad9f660e99b11fec20cafaf8f016"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="api_8h.html#a3ce3ad9f660e99b11fec20cafaf8f016">netconn_set_sendtimeout</a>(conn,  timeout)&#160;&#160;&#160;((conn)-&gt;send_timeout = (timeout))</td></tr>
<tr class="separator:a3ce3ad9f660e99b11fec20cafaf8f016"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d6e84458eec796b0b0ce1bb247f323f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="api_8h.html#a7d6e84458eec796b0b0ce1bb247f323f">netconn_get_sendtimeout</a>(conn)&#160;&#160;&#160;((conn)-&gt;send_timeout)</td></tr>
<tr class="separator:a7d6e84458eec796b0b0ce1bb247f323f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04785274634a5b504c760731c2e70725"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="api_8h.html#a04785274634a5b504c760731c2e70725">netconn_set_recvbufsize</a>(conn,  recvbufsize)&#160;&#160;&#160;((conn)-&gt;recv_bufsize = (recvbufsize))</td></tr>
<tr class="separator:a04785274634a5b504c760731c2e70725"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac0298c287dc3823047c378c014ff1eb0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="api_8h.html#ac0298c287dc3823047c378c014ff1eb0">netconn_get_recvbufsize</a>(conn)&#160;&#160;&#160;((conn)-&gt;recv_bufsize)</td></tr>
<tr class="separator:ac0298c287dc3823047c378c014ff1eb0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a3e130339f00202b3ab714af502163a2d"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="api_8h.html#a3e130339f00202b3ab714af502163a2d">netconn_callback</a>) (struct <a class="el" href="structnetconn.html">netconn</a> *, enum <a class="el" href="api_8h.html#af722260882d14c49afb765293ffb0155">netconn_evt</a>, u16_t len)</td></tr>
<tr class="separator:a3e130339f00202b3ab714af502163a2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:gaaba260d28d105fb4bce9185fd0300d91"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#gaaba260d28d105fb4bce9185fd0300d91">netconn_type</a> { , <br />
&#160;&#160;<a class="el" href="group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91a75d14318b91af7a452230189f47e5e1a">NETCONN_TCP</a> = 0x10, 
<a class="el" href="group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91ae7efa7c4e50b7b381531a2136cd5a013">NETCONN_TCP_IPV6</a> = NETCONN_TCP | 0x08, 
<a class="el" href="group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91a6b8ec191d69f7e639f4ab40779069636">NETCONN_UDP</a> = 0x20, 
<a class="el" href="group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91a655e1625cc7e6a93f1e3d2646f56a1e4">NETCONN_UDPLITE</a> = 0x21, 
<br />
&#160;&#160;<a class="el" href="group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91a7e0c3f566b3d4321b36b711b6b1ad6de">NETCONN_UDPNOCHKSUM</a> = 0x22, 
<a class="el" href="group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91a34ee1c89f6705462590a4fe2c9772d9e">NETCONN_UDP_IPV6</a> = NETCONN_UDP | 0x08, 
<a class="el" href="group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91aa9cabc9d90606b5c5939fcc02ac588c7">NETCONN_UDPLITE_IPV6</a> = NETCONN_UDPLITE | 0x08, 
<a class="el" href="group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91a2c7f548d26f6c411f084b6c59247b60e">NETCONN_UDPNOCHKSUM_IPV6</a> = NETCONN_UDPNOCHKSUM | 0x08, 
<br />
&#160;&#160;<a class="el" href="group__netconn__common.html#ggaaba260d28d105fb4bce9185fd0300d91a0d828a7e9c1614d4cae56602b09f39e9">NETCONN_RAW</a> = 0x40
<br />
 }</td></tr>
<tr class="separator:gaaba260d28d105fb4bce9185fd0300d91"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c6c9c1869f443c5ec7b31180a44fada"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="api_8h.html#a2c6c9c1869f443c5ec7b31180a44fada">netconn_state</a> </td></tr>
<tr class="separator:a2c6c9c1869f443c5ec7b31180a44fada"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af722260882d14c49afb765293ffb0155"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="api_8h.html#af722260882d14c49afb765293ffb0155">netconn_evt</a> </td></tr>
<tr class="separator:af722260882d14c49afb765293ffb0155"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c6ded2c082de1536019b197a0a912db"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="api_8h.html#a5c6ded2c082de1536019b197a0a912db">netconn_igmp</a> </td></tr>
<tr class="separator:a5c6ded2c082de1536019b197a0a912db"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ad0a0434e5ff08bb350740cb840e2aca8"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structnetconn.html">netconn</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="api_8h.html#ad0a0434e5ff08bb350740cb840e2aca8">netconn_new_with_proto_and_callback</a> (enum <a class="el" href="group__netconn__common.html#gaaba260d28d105fb4bce9185fd0300d91">netconn_type</a> t, u8_t proto, <a class="el" href="api_8h.html#a3e130339f00202b3ab714af502163a2d">netconn_callback</a> callback)</td></tr>
<tr class="separator:ad0a0434e5ff08bb350740cb840e2aca8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad5c079af0ad791a92fe9dade375744f0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#gad5c079af0ad791a92fe9dade375744f0">netconn_prepare_delete</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn)</td></tr>
<tr class="separator:gad5c079af0ad791a92fe9dade375744f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab411221f912a6d9e4c82ac3963989403"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#gab411221f912a6d9e4c82ac3963989403">netconn_delete</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn)</td></tr>
<tr class="separator:gab411221f912a6d9e4c82ac3963989403"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a28430d1d86733f1bf98dc31305c42104"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="api_8h.html#a28430d1d86733f1bf98dc31305c42104">netconn_getaddr</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *addr, u16_t *port, u8_t local)</td></tr>
<tr class="separator:a28430d1d86733f1bf98dc31305c42104"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga63bcc4d7bd150674fa953a1253fa6230"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#ga63bcc4d7bd150674fa953a1253fa6230">netconn_bind</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, const <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *addr, u16_t port)</td></tr>
<tr class="separator:ga63bcc4d7bd150674fa953a1253fa6230"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa78479deeedcecd3bacade387ac40cc5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#gaa78479deeedcecd3bacade387ac40cc5">netconn_bind_if</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, u8_t if_idx)</td></tr>
<tr class="separator:gaa78479deeedcecd3bacade387ac40cc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacba7f74d973872ad0b88b9a96098cf77"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#gacba7f74d973872ad0b88b9a96098cf77">netconn_connect</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, const <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *addr, u16_t port)</td></tr>
<tr class="separator:gacba7f74d973872ad0b88b9a96098cf77"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga90bb4c4d1af6602a655b78fce0520402"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__udp.html#ga90bb4c4d1af6602a655b78fce0520402">netconn_disconnect</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn)</td></tr>
<tr class="separator:ga90bb4c4d1af6602a655b78fce0520402"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga84333ba8e7cdf45558d2b4795f53265d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__tcp.html#ga84333ba8e7cdf45558d2b4795f53265d">netconn_listen_with_backlog</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, u8_t backlog)</td></tr>
<tr class="separator:ga84333ba8e7cdf45558d2b4795f53265d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga13593148f60f7bbc6a505b567f175d69"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__tcp.html#ga13593148f60f7bbc6a505b567f175d69">netconn_accept</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, struct <a class="el" href="structnetconn.html">netconn</a> **new_conn)</td></tr>
<tr class="separator:ga13593148f60f7bbc6a505b567f175d69"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga50490bab058f4e740798beffcf48cabf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#ga50490bab058f4e740798beffcf48cabf">netconn_recv</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, struct <a class="el" href="structnetbuf.html">netbuf</a> **new_buf)</td></tr>
<tr class="separator:ga50490bab058f4e740798beffcf48cabf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a805a90b546c5a149f04782351633979b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="api_8h.html#a805a90b546c5a149f04782351633979b">netconn_recv_udp_raw_netbuf</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, struct <a class="el" href="structnetbuf.html">netbuf</a> **new_buf)</td></tr>
<tr class="separator:a805a90b546c5a149f04782351633979b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a505c3b8e400babf9681e09c945b7f421"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="api_8h.html#a505c3b8e400babf9681e09c945b7f421">netconn_recv_udp_raw_netbuf_flags</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, struct <a class="el" href="structnetbuf.html">netbuf</a> **new_buf, u8_t apiflags)</td></tr>
<tr class="separator:a505c3b8e400babf9681e09c945b7f421"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6893cb7648733d1f05696bac94e10490"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__tcp.html#ga6893cb7648733d1f05696bac94e10490">netconn_recv_tcp_pbuf</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, struct <a class="el" href="structpbuf.html">pbuf</a> **new_buf)</td></tr>
<tr class="separator:ga6893cb7648733d1f05696bac94e10490"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabb8a242c445ef928c23258a2b2344294"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__tcp.html#gabb8a242c445ef928c23258a2b2344294">netconn_recv_tcp_pbuf_flags</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, struct <a class="el" href="structpbuf.html">pbuf</a> **new_buf, u8_t apiflags)</td></tr>
<tr class="separator:gabb8a242c445ef928c23258a2b2344294"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8e1d852119bda1e1b602c2995282ef0c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__udp.html#ga8e1d852119bda1e1b602c2995282ef0c">netconn_sendto</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, struct <a class="el" href="structnetbuf.html">netbuf</a> *buf, const <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *addr, u16_t port)</td></tr>
<tr class="separator:ga8e1d852119bda1e1b602c2995282ef0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac4d4d10153d47c80a783c34b27c66238"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__udp.html#gac4d4d10153d47c80a783c34b27c66238">netconn_send</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, struct <a class="el" href="structnetbuf.html">netbuf</a> *buf)</td></tr>
<tr class="separator:gac4d4d10153d47c80a783c34b27c66238"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacf9ce6f71652739d6be2ca83f7c423bf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__tcp.html#gacf9ce6f71652739d6be2ca83f7c423bf">netconn_write_partly</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, const void *dataptr, size_t size, u8_t apiflags, size_t *bytes_written)</td></tr>
<tr class="separator:gacf9ce6f71652739d6be2ca83f7c423bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a992b4fe8a855fd94861738f7260d0a32"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="api_8h.html#a992b4fe8a855fd94861738f7260d0a32">netconn_write_vectors_partly</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, struct <a class="el" href="structnetvector.html">netvector</a> *vectors, u16_t vectorcnt, u8_t apiflags, size_t *bytes_written)</td></tr>
<tr class="separator:a992b4fe8a855fd94861738f7260d0a32"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga25bb1c1c9928f91f53149a026e2e2624"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__tcp.html#ga25bb1c1c9928f91f53149a026e2e2624">netconn_close</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn)</td></tr>
<tr class="separator:ga25bb1c1c9928f91f53149a026e2e2624"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6ec6b2cf7b0f59e9371e38ae7dea2a63"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__tcp.html#ga6ec6b2cf7b0f59e9371e38ae7dea2a63">netconn_shutdown</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, u8_t shut_rx, u8_t shut_tx)</td></tr>
<tr class="separator:ga6ec6b2cf7b0f59e9371e38ae7dea2a63"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaaaf2f92eeb38dca70b3e6ad98c3c45ed"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__udp.html#gaaaf2f92eeb38dca70b3e6ad98c3c45ed">netconn_join_leave_group</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, const <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *multiaddr, const <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *netif_addr, enum <a class="el" href="api_8h.html#a5c6ded2c082de1536019b197a0a912db">netconn_igmp</a> join_or_leave)</td></tr>
<tr class="separator:gaaaf2f92eeb38dca70b3e6ad98c3c45ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5db2a1cf06a5fbb36f433e637da8729b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__udp.html#ga5db2a1cf06a5fbb36f433e637da8729b">netconn_join_leave_group_netif</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, const <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *multiaddr, u8_t if_idx, enum <a class="el" href="api_8h.html#a5c6ded2c082de1536019b197a0a912db">netconn_igmp</a> join_or_leave)</td></tr>
<tr class="separator:ga5db2a1cf06a5fbb36f433e637da8729b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafb3494b149dff96ed8d1acb770ab52f5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#gafb3494b149dff96ed8d1acb770ab52f5">netconn_gethostbyname_addrtype</a> (const char *name, <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *addr, u8_t dns_addrtype)</td></tr>
<tr class="separator:gafb3494b149dff96ed8d1acb770ab52f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab9eccae90351eb6c3d2ca690068445d4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#gab9eccae90351eb6c3d2ca690068445d4">netconn_err</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn)</td></tr>
<tr class="separator:gab9eccae90351eb6c3d2ca690068445d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>netconn API (to be used from non-TCPIP threads) </p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a3ce590f58be8f60dbde361920863b26d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3ce590f58be8f60dbde361920863b26d">&#9670;&nbsp;</a></span>API_EVENT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define API_EVENT</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">c, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">e, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">l&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line"><span class="keywordflow">if</span> (c-&gt;callback) {         \</div><div class="line">                           (*c-&gt;callback)(c, e, l); \</div><div class="line">                         }</div></div><!-- fragment --><p>Register an Network connection event </p>

</div>
</div>
<a id="a24d62a2a03ba421fcf2bdce1ea89b949"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a24d62a2a03ba421fcf2bdce1ea89b949">&#9670;&nbsp;</a></span>NETCONN_FIN_RX_PENDING</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define NETCONN_FIN_RX_PENDING&#160;&#160;&#160;0x80</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>A FIN has been received but not passed to the application yet </p>

</div>
</div>
<a id="a9d791955a4256a0589a3844e4e6f0f9c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9d791955a4256a0589a3844e4e6f0f9c">&#9670;&nbsp;</a></span>NETCONN_FLAG_CHECK_WRITESPACE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define NETCONN_FLAG_CHECK_WRITESPACE&#160;&#160;&#160;0x10</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>If a nonblocking write has been rejected before, poll_tcp needs to check if the netconn is writable again </p>

</div>
</div>
<a id="a70bb861ee643b60ee402fd48f581f58d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a70bb861ee643b60ee402fd48f581f58d">&#9670;&nbsp;</a></span>NETCONN_FLAG_IN_NONBLOCKING_CONNECT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define NETCONN_FLAG_IN_NONBLOCKING_CONNECT&#160;&#160;&#160;0x04</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Was the last connect action a non-blocking one? </p>

</div>
</div>
<a id="a60892e4eb139f10157847fea4266bf5b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a60892e4eb139f10157847fea4266bf5b">&#9670;&nbsp;</a></span>NETCONN_FLAG_IPV6_V6ONLY</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define NETCONN_FLAG_IPV6_V6ONLY&#160;&#160;&#160;0x20</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>If this flag is set then only IPv6 communication is allowed on the netconn. As per RFC#3493 this features defaults to OFF allowing dual-stack usage by default. </p>

</div>
</div>
<a id="af77be7590d3712259e78103c1dddf63f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af77be7590d3712259e78103c1dddf63f">&#9670;&nbsp;</a></span>NETCONN_FLAG_MBOXCLOSED</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define NETCONN_FLAG_MBOXCLOSED&#160;&#160;&#160;0x01</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This netconn had an error, don't block on recvmbox/acceptmbox any more </p>

</div>
</div>
<a id="abee57aa0ba63e35742d411bc5224900a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abee57aa0ba63e35742d411bc5224900a">&#9670;&nbsp;</a></span>NETCONN_FLAG_NON_BLOCKING</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define NETCONN_FLAG_NON_BLOCKING&#160;&#160;&#160;0x02</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Should this netconn avoid blocking? </p>

</div>
</div>
<a id="ac0298c287dc3823047c378c014ff1eb0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac0298c287dc3823047c378c014ff1eb0">&#9670;&nbsp;</a></span>netconn_get_recvbufsize</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define netconn_get_recvbufsize</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">conn</td><td>)</td>
          <td>&#160;&#160;&#160;((conn)-&gt;recv_bufsize)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the receive buffer in bytes </p>

</div>
</div>
<a id="a7d6e84458eec796b0b0ce1bb247f323f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7d6e84458eec796b0b0ce1bb247f323f">&#9670;&nbsp;</a></span>netconn_get_sendtimeout</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define netconn_get_sendtimeout</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">conn</td><td>)</td>
          <td>&#160;&#160;&#160;((conn)-&gt;send_timeout)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the send timeout in milliseconds </p>

</div>
</div>
<a id="a5789f0030b895b40625a74deb5a1092f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5789f0030b895b40625a74deb5a1092f">&#9670;&nbsp;</a></span>netconn_is_nonblocking</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define netconn_is_nonblocking</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">conn</td><td>)</td>
          <td>&#160;&#160;&#160;(((conn)-&gt;flags &amp; <a class="el" href="api_8h.html#abee57aa0ba63e35742d411bc5224900a">NETCONN_FLAG_NON_BLOCKING</a>) != 0)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the blocking status of netconn calls ( </p>

</div>
</div>
<a id="a6a578dd5b55e4457e0d23574ec9c55bb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6a578dd5b55e4457e0d23574ec9c55bb">&#9670;&nbsp;</a></span>netconn_set_nonblocking</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define netconn_set_nonblocking</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">conn, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">val&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line"><span class="keywordflow">do</span> { <span class="keywordflow">if</span>(val) { \</div><div class="line">  netconn_set_flags(conn, <a class="code" href="api_8h.html#abee57aa0ba63e35742d411bc5224900a">NETCONN_FLAG_NON_BLOCKING</a>); \</div><div class="line">} <span class="keywordflow">else</span> { \</div><div class="line">  netconn_clear_flags(conn, <a class="code" href="api_8h.html#abee57aa0ba63e35742d411bc5224900a">NETCONN_FLAG_NON_BLOCKING</a>); }} <span class="keywordflow">while</span>(0)</div><div class="ttc" id="api_8h_html_abee57aa0ba63e35742d411bc5224900a"><div class="ttname"><a href="api_8h.html#abee57aa0ba63e35742d411bc5224900a">NETCONN_FLAG_NON_BLOCKING</a></div><div class="ttdeci">#define NETCONN_FLAG_NON_BLOCKING</div><div class="ttdef"><b>Definition:</b> api.h:73</div></div>
</div><!-- fragment --><p>Set the blocking status of netconn calls ( </p>

</div>
</div>
<a id="a04785274634a5b504c760731c2e70725"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a04785274634a5b504c760731c2e70725">&#9670;&nbsp;</a></span>netconn_set_recvbufsize</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define netconn_set_recvbufsize</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">conn, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">recvbufsize&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;((conn)-&gt;recv_bufsize = (recvbufsize))</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set the receive buffer in bytes </p>

</div>
</div>
<a id="a3ce3ad9f660e99b11fec20cafaf8f016"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3ce3ad9f660e99b11fec20cafaf8f016">&#9670;&nbsp;</a></span>netconn_set_sendtimeout</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define netconn_set_sendtimeout</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">conn, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">timeout&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;((conn)-&gt;send_timeout = (timeout))</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set the send timeout in milliseconds </p>

</div>
</div>
<a id="a62cd17ad03bb2817cb0c419e1c9790b1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a62cd17ad03bb2817cb0c419e1c9790b1">&#9670;&nbsp;</a></span>netconn_type</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="group__netconn__common.html#gaaba260d28d105fb4bce9185fd0300d91">netconn_type</a></td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">conn</td><td>)</td>
          <td>&#160;&#160;&#160;(conn-&gt;type)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the type of a netconn (as enum netconn_type). </p>

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="a3e130339f00202b3ab714af502163a2d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3e130339f00202b3ab714af502163a2d">&#9670;&nbsp;</a></span>netconn_callback</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(*  netconn_callback) (struct <a class="el" href="structnetconn.html">netconn</a> *, enum <a class="el" href="api_8h.html#af722260882d14c49afb765293ffb0155">netconn_evt</a>, u16_t len)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>A callback prototype to inform about events for a netconn </p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="af722260882d14c49afb765293ffb0155"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af722260882d14c49afb765293ffb0155">&#9670;&nbsp;</a></span>netconn_evt</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="api_8h.html#af722260882d14c49afb765293ffb0155">netconn_evt</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Used to inform the callback function about changes</p>
<p>Event explanation:</p>
<p>In the netconn implementation, there are three ways to block a client:</p>
<ul>
<li>accept mbox (sys_arch_mbox_fetch(&amp;conn-&gt;acceptmbox, &amp;accept_ptr, 0); in <a class="el" href="group__netconn__tcp.html#ga13593148f60f7bbc6a505b567f175d69">netconn_accept()</a>)</li>
<li>receive mbox (sys_arch_mbox_fetch(&amp;conn-&gt;recvmbox, &amp;buf, 0); in netconn_recv_data())</li>
<li>send queue is full (sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); in <a class="el" href="api__msg_8c.html#aca4545a471ead1bc673ea93fe85f7e5c">lwip_netconn_do_write()</a>)</li>
</ul>
<p>The events have to be seen as events signaling the state of these mboxes/semaphores. For non-blocking connections, you need to know in advance whether a call to a netconn function call would block or not, and these events tell you about that.</p>
<p>RCVPLUS events say: Safe to perform a potentially blocking call call once more. They are counted in sockets - three RCVPLUS events for accept mbox means you are safe to call netconn_accept 3 times without being blocked. Same thing for receive mbox.</p>
<p>RCVMINUS events say: Your call to to a possibly blocking function is "acknowledged". Socket implementation decrements the counter.</p>
<p>For TX, there is no need to count, its merely a flag. SENDPLUS means you may send something. SENDPLUS occurs when enough data was delivered to peer so <a class="el" href="group__netconn__udp.html#gac4d4d10153d47c80a783c34b27c66238">netconn_send()</a> can be called again. A SENDMINUS event occurs when the next call to a <a class="el" href="group__netconn__udp.html#gac4d4d10153d47c80a783c34b27c66238">netconn_send()</a> would be blocking. </p>

</div>
</div>
<a id="a5c6ded2c082de1536019b197a0a912db"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5c6ded2c082de1536019b197a0a912db">&#9670;&nbsp;</a></span>netconn_igmp</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="api_8h.html#a5c6ded2c082de1536019b197a0a912db">netconn_igmp</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Used for <a class="el" href="group__netconn__udp.html#gaaaf2f92eeb38dca70b3e6ad98c3c45ed">netconn_join_leave_group()</a> </p>

</div>
</div>
<a id="a2c6c9c1869f443c5ec7b31180a44fada"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2c6c9c1869f443c5ec7b31180a44fada">&#9670;&nbsp;</a></span>netconn_state</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="api_8h.html#a2c6c9c1869f443c5ec7b31180a44fada">netconn_state</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Current state of the netconn. Non-TCP netconns are always in state NETCONN_NONE! </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a28430d1d86733f1bf98dc31305c42104"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a28430d1d86733f1bf98dc31305c42104">&#9670;&nbsp;</a></span>netconn_getaddr()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> netconn_getaddr </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structnetconn.html">netconn</a> *&#160;</td>
          <td class="paramname"><em>conn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *&#160;</td>
          <td class="paramname"><em>addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16_t *&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8_t&#160;</td>
          <td class="paramname"><em>local</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the local or remote IP address and port of a netconn. For RAW netconns, this returns the protocol instead of a port!</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>the netconn to query </td></tr>
    <tr><td class="paramname">addr</td><td>a pointer to which to save the IP address </td></tr>
    <tr><td class="paramname">port</td><td>a pointer to which to save the port (or protocol for RAW) </td></tr>
    <tr><td class="paramname">local</td><td>1 to get the local IP address, 0 to get the remote one </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ERR_CONN for invalid connections ERR_OK if the information was retrieved </dd></dl>

</div>
</div>
<a id="ad0a0434e5ff08bb350740cb840e2aca8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad0a0434e5ff08bb350740cb840e2aca8">&#9670;&nbsp;</a></span>netconn_new_with_proto_and_callback()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structnetconn.html">netconn</a>* netconn_new_with_proto_and_callback </td>
          <td>(</td>
          <td class="paramtype">enum <a class="el" href="group__netconn__common.html#gaaba260d28d105fb4bce9185fd0300d91">netconn_type</a>&#160;</td>
          <td class="paramname"><em>t</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8_t&#160;</td>
          <td class="paramname"><em>proto</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="api_8h.html#a3e130339f00202b3ab714af502163a2d">netconn_callback</a>&#160;</td>
          <td class="paramname"><em>callback</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create a new netconn (of a specific type) that has a callback function. The corresponding pcb is also created.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">t</td><td>the type of 'connection' to create (</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd>enum <a class="el" href="group__netconn__common.html#gaaba260d28d105fb4bce9185fd0300d91">netconn_type</a>) </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">proto</td><td>the IP protocol for RAW IP pcbs </td></tr>
    <tr><td class="paramname">callback</td><td>a function to call on status changes (RX available, TX'ed) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a newly allocated struct netconn or NULL on memory error </dd></dl>

</div>
</div>
<a id="a805a90b546c5a149f04782351633979b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a805a90b546c5a149f04782351633979b">&#9670;&nbsp;</a></span>netconn_recv_udp_raw_netbuf()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> netconn_recv_udp_raw_netbuf </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structnetconn.html">netconn</a> *&#160;</td>
          <td class="paramname"><em>conn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structnetbuf.html">netbuf</a> **&#160;</td>
          <td class="paramname"><em>new_buf</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Receive data (in form of a netbuf) from a UDP or RAW netconn</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>the netconn from which to receive data </td></tr>
    <tr><td class="paramname">new_buf</td><td>pointer where a new netbuf is stored when received data </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ERR_OK if data has been received, an error code otherwise (timeout, memory error or another error) ERR_ARG if conn is not a UDP/RAW netconn </dd></dl>

</div>
</div>
<a id="a505c3b8e400babf9681e09c945b7f421"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a505c3b8e400babf9681e09c945b7f421">&#9670;&nbsp;</a></span>netconn_recv_udp_raw_netbuf_flags()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> netconn_recv_udp_raw_netbuf_flags </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structnetconn.html">netconn</a> *&#160;</td>
          <td class="paramname"><em>conn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structnetbuf.html">netbuf</a> **&#160;</td>
          <td class="paramname"><em>new_buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8_t&#160;</td>
          <td class="paramname"><em>apiflags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Receive data (in form of a netbuf) from a UDP or RAW netconn</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>the netconn from which to receive data </td></tr>
    <tr><td class="paramname">new_buf</td><td>pointer where a new netbuf is stored when received data </td></tr>
    <tr><td class="paramname">apiflags</td><td>flags that control function behaviour. For now only:<ul>
<li>NETCONN_DONTBLOCK: only read data that is available now, don't wait for more data </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ERR_OK if data has been received, an error code otherwise (timeout, memory error or another error) ERR_ARG if conn is not a UDP/RAW netconn </dd></dl>

</div>
</div>
<a id="a992b4fe8a855fd94861738f7260d0a32"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a992b4fe8a855fd94861738f7260d0a32">&#9670;&nbsp;</a></span>netconn_write_vectors_partly()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> netconn_write_vectors_partly </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structnetconn.html">netconn</a> *&#160;</td>
          <td class="paramname"><em>conn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structnetvector.html">netvector</a> *&#160;</td>
          <td class="paramname"><em>vectors</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16_t&#160;</td>
          <td class="paramname"><em>vectorcnt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8_t&#160;</td>
          <td class="paramname"><em>apiflags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>bytes_written</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Send vectorized data atomically over a TCP netconn.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>the TCP netconn over which to send data </td></tr>
    <tr><td class="paramname">vectors</td><td>array of vectors containing data to send </td></tr>
    <tr><td class="paramname">vectorcnt</td><td>number of vectors in the array </td></tr>
    <tr><td class="paramname">apiflags</td><td>combination of following flags :<ul>
<li>NETCONN_COPY: data will be copied into memory belonging to the stack</li>
<li>NETCONN_MORE: for TCP connection, PSH flag will be set on last segment sent</li>
<li>NETCONN_DONTBLOCK: only write the data if all data can be written at once </li>
</ul>
</td></tr>
    <tr><td class="paramname">bytes_written</td><td>pointer to a location that receives the number of written bytes </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ERR_OK if data was sent, any other err_t on error </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_b0856f6b0d80ccb263b2f415c91f9e17.html">include</a></li><li class="navelem"><a class="el" href="dir_4e6b3cf33a61b6caac9c8ac30c866f37.html">lwip</a></li><li class="navelem"><a class="el" href="api_8h.html">api.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
